1. Field of the Invention
The present invention relates to an optical sensor that detects the amount of displacement of a detecting object on the basis of a reference characteristic of a surface of the detecting object. More particularly though not exclusively, the present invention relates to an optical sensor installed in a recording apparatus to detect the amount of displacement of a detecting object, to detect the color density, and to determine the type of the detecting object.
2. Description of the Related Art
Inkjet recording apparatuses (hereinafter referred to as recording apparatuses) have been equipped with various sensors corresponding to different purposes in order to meet various needs such as higher image quality, higher precision, and higher user friendliness. Examples of sensors used are a sensor for detecting the width (size) of a recording sheet (recording medium) set in a recording apparatus and the end of the recording sheet, a sensor for measuring the density of a patch (pattern) or an image recorded on the recording sheet, a sensor for detecting the thickness and presence of the recording sheet, and a sensor for determining the type of the recording sheet.
These recording apparatuses generally use optical sensors. Optical sensors include a light-emitting element for emitting light, and a light-receiving element for receiving the light from the light-emitting element. The light-receiving element provides an output in accordance with the amount (intensity) of received light. In particular, a transmissive optical sensor and a reflective optical sensor are frequently used.
In general, a reflective sensor is used to detect the thickness of a recording sheet. In the reflective sensor, a light-emitting element applies light onto a surface of a recording sheet serving as a detecting object to be detected, and a light-receiving element receives light reflected by the recording sheet. The distance between the reflective sensor and the surface of the recording sheet can be measured on the basis of the amount of light received by the light-receiving element. For example, when an optical reflective sensor is mounted on a carriage of the recording apparatus, measurement is performed as follows. First, a recording sheet serving as a detecting object to be detected is moved from a recording-sheet storage unit onto a platen, and the distance between the surface of the recording sheet and the reflective sensor mounted on the carriage is measured by the reflective sensor. In this case, since the distance between the reflective sensor and the platen is set at a value specified in design of the recording apparatus, the thickness of the recording sheet can be detected by calculation on the basis of the measured distance and the specified value.
Japanese Patent Laid-Open No. 05-087526 discusses an optical sensor that detects the thickness of a recording sheet. In this optical sensor, an LED or a semiconductor laser is used as a light-emitting element, and a PSD (position sensitive detector) or a CCD is used as a light-receiving element. In this case, light emitted from the light-emitting element is reflected by a detecting object, and a part of the reflected light is received by the light-receiving element. With this configuration, if the distance between the optical sensor and the detecting object changes, the center of reflected light received by the light-receiving element also changes. When the light-receiving element is a CCD, the amount of light in each pixel can be measured. Therefore, the center of reflected light can be found by detecting the pixel in which the largest amount of light is obtained, and the distance between the optical sensor and the detecting object can be calculated by triangulation. When the light-receiving element is a PSD, the center of reflected light is obtained by calculating two values output from the light-receiving element when the center changes, and the distance between the sensor and the detecting object can be calculated from the obtained position by triangulation.
In a general optical sensor for detecting the width of a recording sheet and ends (a leading end and a trailing end) of the recording sheet, a reflective optical system is constituted by one light-emitting element and one light-receiving element, and the ends of the recording sheet are detected on the basis of changes in intensity (amount) of reflected light. It is checked whether a recording sheet is placed within a detection area of the optical sensor, by using the fact that there is a difference in intensity of reflected light received by the light-receiving element when the light-emitting element applies light onto the surface of the recording sheet and when the light-emitting element applies light onto a portion outside the recording sheet, for example, on a platen or a feeding path. In an inkjet recording apparatus, in which a carriage is scanned in a direction different from the feeding direction of the recording sheet, when the reflective sensor is mounted on the carriage, the widthwise end of the recording sheet can also be detected.
A sensor for measuring the color density of a patch printed on a recording sheet includes three light-emitting elements for emitting red, blue, and green light beams and one light-receiving element, or includes a white light source and a light-receiving element having a color filter. Japanese Patent Laid-Open No. 05-346626 discusses a technique of detecting the color density of a color patch with this sensor. In this technique, reflected light from the color patch is received by the light-receiving element, and the amount of attenuation of reflection intensity from the reference reflection intensity is calculated. In an inkjet recording apparatus in which a carriage is scanned in a direction different from the feeding direction of the recording sheet, when the reflective sensor is mounted on the carriage, the density of a patch recorded at a predetermined position on the recording sheet can be detected.
The above-described known optical sensor for detecting the thickness of the recording sheet includes a light-emitting element such as an LED, and a light-receiving element such as a photodiode. While the optical sensor itself is inexpensive, it cannot check whether the detecting object is shifted closer to or away from a predetermined position. In a reflective optical sensor, a light-receiving element is placed at a position such as to receive the largest possible amount of reflected light from a detecting surface on which light is applied by a light-emitting element, (e.g., FIG. 8B). That is, the light axis of reflected from the detecting surface coincides with the center of the light-receiving element. In this case, the distance between the optical sensor and the detecting surface is referred to as a reference distance, and the detecting surface is referred to as a reference surface.
A sheet having a predetermined reflection characteristic can be used as the reference surface which is the reference for calibration of the optical sensor. When the detecting object is shifted from the reference surface toward the optical sensor, that is, the distance between the detecting object and the optical sensor is shorter than the reference distance, as shown in FIG. 8A, the amount of light reflected by the detecting object and received by the light-receiving element is smaller than when the light is reflected by the reference surface. This is because the light axis of reflected light from the detecting surface does not coincide with the center of the light-receiving element, and a region on the detecting surface in which light is applied from the light-emitting element is not aligned with a light-receiving region of the light-receiving element on the detecting surface. When the detecting object is shifted from the reference surface away from the optical sensor, as shown in FIG. 8C, similarly, the amount of light received by the light-receiving element is reduced.
In FIGS. 8A to 8C, reference numerals 801a-c, and 802a-c denote a light-emitting region of the infrared LED 201, and a light-receiving region of the phototransistor 203. In the above described situation related to what is illustrated in FIG. 8A, the light emitting region 801a and the light receiving region 802a overlapped partially, with a similar amount of overlap for the situation illustrated in FIG. 8C (regions 801c and 802c). In the situation of FIG. 8B, the light emitting region 801b lies completely in the light receiving region 802b. 
FIG. 9 is a graph showing changes in the output from the light-receiving element caused when the distance between the optical sensor and the detecting object changes. As shown in FIG. 9, it is difficult for the inexpensive reflective sensor to check whether the detecting object is shifted from the reference surface toward the optical sensor or away from the optical sensor.
In the above-described optical sensor discussed in Japanese Patent Laid-Open No. 05-087526, a PSD or a CCD is used as the light-receiving element. In this case, the distance between the optical sensor and the detecting object can be detected. However, the size of the optical sensor increases, and the cost also increases because of the PSD or the CCD.